﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;

namespace SlickGridNet
{

	partial class SlickGrid
	{
		internal static SlickGrid Create<TModel>(IEnumerable<TModel> data)
		{
			var type = data.GetType();
			var propertyInfos = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);
			foreach (var propInfo in propertyInfos)
			{
				Debug.WriteLine(propInfo.PropertyType);
				var propType = propInfo.PropertyType;
				switch (Type.GetTypeCode(propType))
				{
					case TypeCode.Empty:
						break;
					case TypeCode.Object:
						break;
					case TypeCode.DBNull:
						break;
					case TypeCode.Boolean:
						break;
					case TypeCode.Char:
						break;
					case TypeCode.SByte:
						break;
					case TypeCode.Byte:
						break;
					case TypeCode.Int16:
						break;
					case TypeCode.UInt16:
						break;
					case TypeCode.Int32:
						break;
					case TypeCode.UInt32:
						break;
					case TypeCode.Int64:
						break;
					case TypeCode.UInt64:
						break;
					case TypeCode.Single:
						break;
					case TypeCode.Double:
						break;
					case TypeCode.Decimal:
						break;
					case TypeCode.DateTime:
						break;
					case TypeCode.String:
						break;
					default:
						throw new ArgumentOutOfRangeException();
				}
			}
			return new SlickGrid();
		}
	}
}
